$(function () {
    getTopAndFootData();
})
function getTopAndFootData() {
    let data=myAjax("/getTopAndFootData",{},"get");
    setCompanyModel(data.companyModel);
    setNavList(data.navModelList);
}

function setCompanyModel(data) {
    $("#logo").attr("src", data.logo);
    $("#phone").html(data.phone);
    $("#net").html("网址: " + data.net);
}

function setNavList(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html += '<div onclick="goto(\'' + data[i].href + '\')">' + data[i].title + '</div>';
    }
    $("#navHtml").html(html);
}
